﻿using Worldme.YHChatSDK.Common.Constant;

namespace Worldme.YHChatSDK.Framework.Vo.V1.Req
{
    /// <summary>
    /// 取消设置看板请求体
    /// </summary>
    public class ApiDisBoardReqV1
    {
        /// <summary>
        /// 接收看板对象ID
        /// 用户: userId
        /// 群: groupId
        /// </summary>
        public string chatId { get; set; }
        /// <summary>
        /// 接收看板对象类型
        /// 用户: user
        /// 群: group
        /// </summary>
        public string chatType { get; set; }
        /// <summary>
        /// 群成员用户ID
        /// 如果chatType为 group 时，此字段生效
        /// 为指定群成员设置看板
        /// </summary>
        public string memberId { get; set; }

        /// <summary>
        /// 取消设置看板
        /// </summary>
        /// <param name="chatType">RecvTypeConstant.</param>
        /// <param name="chatId">当为USER时，填用户ID，当为GROUP时，填群ID</param>
        /// <returns></returns>
        public ApiDisBoardReqV1 Dismiss(string chatType, string chatId)
        {
            this.chatId = chatId;
            this.chatType = chatType;
            return this;
        }
        /// <summary>
        /// 为指定群成员取消设置看板
        /// </summary>
        /// <param name="chatId">群ID</param>
        /// <param name="memberId">群成员用户ID</param>
        /// <returns></returns>
        public ApiDisBoardReqV1 DismissForGroup(string chatId, string memberId)
        {
            this.chatId = chatId;
            chatType = RecvTypeConstant.GROUP;
            this.memberId = memberId;
            return this;
        }
    }
}
